package com.foreknow.dao.impl;

import com.foreknow.db.JdbcTemplate;
import com.foreknow.mapping.MappingFactory;

import java.sql.Connection;

public class BaseDao {
    public JdbcTemplate jdbcTemplate = JdbcTemplate.getInstance();
    public MappingFactory mappingFactory = MappingFactory.getInstance();

    /**
     * 注入数据库连接
     * @param connection
     */
    public void setConnection(Connection connection) {
        jdbcTemplate.setConnection(connection);
    }

}
